Grammars are becoming an increasingly important way to analyze data streams. More particularly, generative grammars naturally treat data streams as narratives that can help to reveal inherent structures, which may have practical applications in fields that include unsupervised classification, taxonomy generation, nearest neighbor searching, scientific discovery, vector quantization, speech recognition, text analysis, and navigation, among other things. Because grammars typically group data points into clusters and thereby offer at least some level of compression, grammars are typically measured and compared with respect to the compression ratios associated therewith. However, more information can be obtained from the grammar than just the percentage of space saved. For example, grammars may be measured both syntactically and semantically according to the both the form and content associated therewith. In that sense, different grammars can be compared via appropriate metrics to reach conclusions about the relative similarities and/or differences between the underlying data streams, which can yield deeper understanding about the data in an unsupervised manner. For example, grammars that are syntactically similar may reveal one kind of relationship, whereas grammars that are semantically similar may point to a different kind of relationship. However, formalized grammar metrics to determine relationships or otherwise enable more mathematical comparisons is lacking in the data analysis community even though the results from these comparisons can be used to better determine relationships between the devices that generate the data streams.